package com.yesep.learn.jwt.demo.model;

import java.util.HashSet;
import java.util.Set;

import lombok.Data;

@Data
public class User {

	/**登录名**/
	private String username;

	/**用户名称**/
	private String nickname;

	/**登录密码**/
	private String password;

	/**状态码**/
	private String status;

	private Set<String> roles = new HashSet<>();

	public void addRole(String role) {
		roles.add(role);
	}

	@Override
	public String toString() {
		String sf = "%s [ username=%s, nickname=%s, status=%s ]";
		return String.format(sf, this.getClass().getSimpleName(), username, nickname, status);
	}

}
